package com.test;

import java.util.Scanner;

public class OperatorTest5 {
    public static void main(String[] args) {
        /*
        需求：动物园里有两只老虎，体重分别从键盘录入获得
        请用程序实现判断两只老虎的体重是否相等
         */

        //1.键盘录入两只老虎的体重
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入第一只老虎的体重:");
        int weight1 = scanner.nextInt();
        System.out.println("请输入第二只老虎的体重:");
        int weight2 = scanner.nextInt();

        //2.比较
        String result=weight1==weight2?"体重相同":"体重不同";
        System.out.println(result);
    }
}
